package com.ishopping.api.manage.enums;

import com.ishopping.common.core.base.constant.CommonConstants;

public enum UserTypeEnum {
	INTERNAL_USER(CommonConstants.ZERO, "内部用户"),
	EXTERNAL_USER(CommonConstants.ONE, "外部用户");
	
	private String value;
	
	private String text;

	private UserTypeEnum(String value, String text) {
		this.value = value;
		this.text = text;
	}

	public String getValue() {
		return this.value;
	}

	public String getText() {
		return this.text;
	}

	public static String getTextByValue(String value) {
		String text = null;
		for (UserTypeEnum e : UserTypeEnum.values()) {
			if (e.getValue().equals(value)) {
				text = e.getText();
				break;
			}
		}
		return text;
	}
}
